package cn.anyubao.blog.enums;

/**
 * @Author huql
 * @Description 请求方式枚举
 * @Date 10:36 下午 2021/1/2
 **/
public enum CustomStatusEnum implements BaseEnum<Integer, String>  {

    OK(200, "ok", "请求成功"),
    BAD_REQUEST(400, "bad_request", "请求参数非法"),
    USER_LEAVED(461, "user_leaved", "当前用户已离职"),
    USER_DISABLED(462, "user_disabled", "当前用户已停用"),
    USER_INVALID(463, "user_invalid", "当前用户已停用"),
    FAIL(500, "fail", "请求失败");

    private final Integer value;
    private final String code;
    private final String desc;

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }

    private CustomStatusEnum(Integer value, String code, String desc) {
        this.value = value;
        this.code = code;
        this.desc = desc;
    }

}
